1. Field of the Invention
The present invention relates to the technique of ADPCM (adaptive differential pulse code modulation). More particularly, the present invention relates to an ADPCM encoding apparatus, an ADPCM decoding apparatus and a delay circuit used in an echo generation system for a xe2x80x9cKaraokexe2x80x9d sing-along system.
2. Prior Art
In the recent years, a plurality of prediction units are operated at the same time for suppressing the prediction error in ADPCM systems by comparing respective prediction errors and switching one from another.
However, in the case of such a conventional system, the calculation of the prediction errors of a plurality of prediction units and the comparison of those prediction errors require an increased number of logic circuits. In addition to this, the compression efficiency tends to decrease due to information to be saved in the compressed data for appropriate switching the plurality of the prediction units. Accordingly, such a system is not suitable for use in compact devices such as an echo generation system for a xe2x80x9cKaraokexe2x80x9d sing-along system, a shock-proof mechanism in a small portable audio device and so on.
The present invention has been made in order to solve the shortcomings as described above. It is an important object of the present invention to provide an ADPCM encoding apparatus, an ADPCM decoding apparatus and a delay circuit with compact circuit designs.
It is another important object of the present invention to provide an ADPCM encoding apparatus, an ADPCM decoding apparatus and a delay circuit without deteriorating the quality of the compressed data.
In brief, the above and other objects and advantages of the present invention are provided by a new and improved ADPCM encoding apparatus for compressing a differential signal between an input digital signal and a predicted value of the digitized input by encoding the differential signal in accordance with adaptive differential pulse code modulation. The ADPCM encoding apparatus comprises a prediction unit for outputting the predicted value; a subtractor for outputting the differential signal between the predicted value as outputted from the prediction unit and the input digital signal; an adaptive quantizer unit for quantizing the differential signal as outputted from the subtractor with a quantization step and outputting the quantized differential signal; a quantization step adjustment unit for updating the quantization step in accordance with the differential signal having been quantized by the adaptive quantizer unit; and an inverse quantizer connected to the adaptive quantizer unit and the quantization step adjustment unit for inversely quantizing the differential quantized signal outputted from the adaptive quantizer unit with the quantization step in order to output a decoded quantized differential signal, the prediction unit connected to the inverse quantizer for outputting a next value of the predicted value with reference to the decoded quantized differential signal, wherein the prediction unit is further connected to the adaptive quantizer and implemented with a plurality of algorithms for calculating the predicted value and performs the prediction in accordance with one of the algorithms which is selected by referring to the differential signal having been outputted from the adaptive quantizer unit.
In accordance with this configuration, the accuracy of the prediction unit is improved by the selective use of different prediction algorithms depending upon the state of the input signal, and as a result, it is possible to improve the quality of the compressed data as the output signal of the ADPCM encoding apparatus.
Also, in accordance with a preferred embodiment of the present invention, the one of the algorithms for calculating the predicted value is selected by referring to the differential signal which has been outputted from the adaptive quantizer unit one cycle before.
By this configuration, there is needed no information about the selection contained in the compressed data so that the compression efficiency is therefore improved.
Also, in accordance with a preferred embodiment of the present invention, the algorithms for calculating the predicted value includes a first algorithm and a second algorithm; the prediction unit is operated to output the predicted value which has been obtained one cycle before in accordance with the first algorithm; and the prediction unit is operated to output the predicted value which is obtained on the basis of extrapolation calculated with the predicted value which has been obtained one cycle before and the predicted value which has been obtained two cycles before in accordance with the second algorithm.
Also, since the configuration can be designed in a simple fashion, the ADPCM decoding apparatus can be implemented within a small area of a semiconductor chip and so on.
In accordance with a further aspect of the present invention, an ADPCM decoding apparatus for receiving a quantized differential signal as inputted and outputting a decoded output digital signal by inversely quantizing the quantized differential signal in accordance with adaptive differential pulse code modulation and obtaining the sum of a decoded quantized differential signal and a prediction value, the ADPCM decoding apparatus comprising: an inverse quantizer for receiving and inversely quantizing a quantized differential signal as inputted with the quantization step in order to output a decoded quantized differential signal; a quantization step adjustment unit connected to the inverse quantizer for updating the quantization step in accordance with quantized differential signal as inputted; a prediction unit for receiving the quantized differential signal as inputted, and calculating and outputting a predicted value of a decoded output digital signal; an adder connected to the inverse quantizer and the prediction unit for calculating the sum of the outputs of the inverse quantizer and the prediction unit, wherein the prediction unit is implemented with a plurality of algorithms for calculating the predicted value and performs the prediction in accordance with one of the algorithms which is selected by referring to the quantized differential signal as inputted.
In accordance with this configuration, the accuracy of the prediction unit is improved by the selective use of different prediction algorithms depending upon the environment, and as a result, it is possible to improve the quality of the compressed data as the output signal of the ADPCM decoding apparatus.
Also, in accordance with a preferred embodiment of the present invention, the one of the algorithms for calculating the predicted value is selected by referring to the differential signal which has been outputted from the adaptive quantizer unit one cycle before.
By this configuration, there is needed no information about the selection contained in the compressed data so that the compression efficiency is therefore improved.
Also, in accordance with a preferred embodiment of the present invention, the algorithms for calculating the predicted value includes a first algorithm and a second algorithm; the prediction unit is operated to output the predicted value which has been obtained one cycle before in accordance with the first algorithm; and the prediction unit is operated to output the predicted value which is obtained on the basis of extrapolation calculated with the predicted value which has been obtained one cycle before and the predicted value which has been obtained two cycles before in accordance with the second algorithm.
Also, since the configuration can be designed in a simple fashion, the ADPCM decoding apparatus can be implemented within a small area of a semiconductor chip and so on.
In accordance with a further aspect of the present invention, a signal delay circuit comprises an analog-digital converter for receiving and converting voice signals as inputted into digitized signals; an ADPCM encoding apparatus connected to the analog-digital converter for compressing the digitized signals into encoded signals by quantizing the digitized signals in accordance with adaptive differential pulse code modulation; a RAM connected to the ADPCM encoding apparatus for temporarily storing the encoded signals; an ADPCM decoding apparatus connected to the RAM for expanding the encoded signals into the digitized signals by inversely quantizing the compressed signal; a digital-analog converter connected to the ADPCM decoding apparatus for converting the digitized signals to the analog output of the voice signals; and a control device connected to the ADPCM encoding apparatus and the ADPCM decoding apparatus for maintaining agreement of the internal variables of the ADPCM encoding apparatus and the ADPCM decoding apparatus.
By this configuration, the correspondence between the ADPCM encoding apparatus and the ADPCM decoding apparatus is periodically maintained so that the operation of the signal delay can be guaranteed.
Also, in accordance with a preferred embodiment of the present invention, the signal delay circuit further comprises a low-pass filter connected to the analog-digital converter for removing the high frequency component of the analog input of voice signals.
By this configuration, it is possible to prevent the voice analog signals from aliasing at the analog-digital converter 12 and to avoid overload upon the ADPCM encoding apparatus 13 due to excessive variation of the signal level.
Also, in accordance with a preferred embodiment of the present invention, the signal delay circuit further comprises a low-pass filter connected to the digital-analog converter 16 for removing the high frequency component of the analog output of the voice signals.
By this configuration, it is possible to remove the high frequency component of the quantization noise mixed with the voice signals as quantized.
Also, in accordance with a preferred embodiment of the present invention, the control device comprises a register for storing the internal variable of the ADPCM encoding apparatus and a transfer device for transferring the contents of the register to the ADPCM decoding apparatus.
By this configuration, the actual implementation of the control device is given.
Also, in accordance with a preferred embodiment of the present invention, the control device is operated to store the internal variable of the ADPCM encoding apparatus and transfer the contents of the register to the ADPCM decoding apparatus with a time interval of the delay time of the echo effect of the echo generation system.
By this configuration, the correspondence between the inside variables of the ADPCM encoding apparatus and the ADPCM decoding apparatus is periodically maintained so that proper operation of the signal delay can be guaranteed.
Also, in accordance with a preferred embodiment of the present invention, the signal delay circuit as claimed in claim 7 wherein the signal delay circuit is implemented in an echo generation system for a xe2x80x9cKaraokexe2x80x9d sing-along system.
By this configuration, the actual application of the delay circuit device is proposed.